<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>企业统计</title>
<%@include file="../collect/meta.jsp"%>
<link rel="stylesheet" href="css/radius.css" type="text/css"></link>
<link rel="stylesheet" href="css/table.css" type="text/css"></link>
<link rel="stylesheet" href="css/btn-bottom.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
</head>
<body lang="zh-cn">
	<div class="wrapper">
		<c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>运营平台</li>
							<li>企业统计</li>
						</ul>
						<!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="alert alert-success">入驻商户：${line }家
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 商户实时余额总数：${sumRbalance }元
								</div>
								<div id="btn-bottom">
									<form action="maccount!seekOneAccount" name="seekOneAccount"
										method="post">
										<input type="text"
											name="searchText" id="searchText" placeholder="企业名称/手机号" />&nbsp;
										<input type="button" class="btn btn-primary radius btn-sm"
											value="模糊搜索" id="searchBtn">
                                        <a class="btn btn-primary radius btn-sm"
											href="maccount!goToAccountChart">统计分析</a>
									</form>
								</div>
								<table id="table_bug_report"
									class="table table-striped table-bordered table-hover">
									<tr>
										<th>企业名称</th>
										<th>注册姓名</th>
										<th>移动手机号</th>
										<th>实时余额</th>
										<th>累计充值</th>
										<th>企业邮箱</th>
										<th>入驻时间</th>
									</tr>
									<c:forEach items="${accountsList}" var="account"
										varStatus="status">
										<tr <c:if test="${status.count%2==0}">bgcolor="#d8e7f0"</c:if>
											<c:if test="${status.count%2!=0}">bgcolor="#ffffff"</c:if>>
											<td>${account.name}</td>
											<td>${account.loginName}</td>
											<td>${account.mobile }</td>
											<td>${account.rbalance}</td>
											<td>${account.totalDeposits}</td>
											<td>${account.email}</td>
											<td>${fn:substring(account.createTime,
													0, fn:indexOf(account.createTime, '.')) }
											</td>
										</tr>
									</c:forEach>
								</table>
								<c:if test="${noPage == 0 }">
									<div class="row" id="page">
										<ul class="pagination">
											<li><a href="maccount!findAllAccountByPage?index=1">首页</a>
											</li>
											<li class="prev"><a
												href="maccount!findAllAccountByPage?index=${index-1}"> <i
													class="icon-double-angle-left"></i> </a>
											</li>
											<!-- <li>
									            <a href="smsLog!getList?index=${index-1}">上一页</a>
									        </li> -->
											<li><a href="javascript:void(0)">${index }</a></li>
											<!-- <li>
									            <a href="smsLog!getList?index=${index+1}">下一页</a>
									        </li> -->
											<li class="next"><a
												href="maccount!findAllAccountByPage?index=${index+1 }">
													<i class="icon-double-angle-right"></i> </a>
											</li>
											<li><a
												href="maccount!findAllAccountByPage?index=${page }">末页</a></li>
											<li><a href="javascript:void(0)">共${page}页</a></li>
										</ul>
									</div>
								</c:if>
								<!-- PAGE CONTENT ENDS -->
							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->
			</div>
			<!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up"
				class="btn-scroll-up btn btn-sm btn-inverse"
				style="position:fixed;bottom:0;"> <i
				class="icon-double-angle-up icon-only bigger-110"></i> </a>
		</div>
		<!-- /.main-container -->
		<div class="push"></div>
	</div>
	<c:import url="/collect/down.jsp"></c:import>
</body>

<script type="text/javascript">
	$(document).ready(function() {
		$("#searchBtn").click(function() {
			var searchText = $("#searchText").val();
			if (searchText.length != 0 && searchText != '企业名称/手机号') {
				$("form[name='seekOneAccount']").submit();
			} else {
				window.location.href = "maccount!findAllAccountByPage?index=1";
			}
		});

		//防收回
		$('.yunying > ul').show();
		$('.yunying > ul > li > a').eq(0).css("color", "red");
	});
</script>
</html>
